﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SalesOrderAdd.aspx.cs" Inherits="weba.Sales.SalesOrderAdd" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" Namespace="C1.Web.Wijmo.Controls.C1AutoComplete" TagPrefix="wijmo" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" Namespace="C1.Web.Wijmo.Controls.C1SuperPanel" TagPrefix="wijmo" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" Namespace="C1.Web.Wijmo.Controls.C1Tabs" TagPrefix="wijmo" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register assembly="C1.Web.Wijmo.Extenders.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" namespace="C1.Web.Wijmo.Extenders.C1Input" tagprefix="wijmo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
       
                
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" background="../Images/tab_05.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="30">
                                <img src="../Images/tab_03.gif" width="12" height="30" />
                            </td>
                            <td>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="46%" valign="middle">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="16" height="16" /></div>
                                                    </td>
                                                    <td width="95%">
                                                        <span class="titleBold12px">添加订单</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="54%" align="right">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="16" height="30">
                                <img src="../Images/tab_07.gif" width="16" height="30" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    
                           
                    <wijmo:C1Tabs ID="C1Tabs1" runat="server">
                        <Pages>
                            <wijmo:C1TabPage runat="server" Text="老客户" StaticKey="" ID="C1Tabs1_Tab1">
                              <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td width="100" height="30" align="right">
                                                                客户查询：
                                                            </td>
                                                            <td align="center">
                                                                可输入电话、手机、客户姓名、地址等关键字查询，支持模糊搜索<br />
                                                              <%--  <asp:TextBox ID="txtSearch" runat="server" Font-Size="20px" Font-Bold="True"></asp:TextBox>--%>
                                                                <wijmo:C1AutoComplete ID="txtSearch" runat="server" DataLabelField="CustomerName" DataMember="DefaultView" DataSourceID="SqlDataSource1" DataValueField="CustomerName"></wijmo:C1AutoComplete>
                                                                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:mysjkConnectionString1 %>" SelectCommand="SELECT DISTINCT [CustomerName] FROM [Sales_Customer]"></asp:SqlDataSource>
                                                                &nbsp;&nbsp;&nbsp;
                                                                <asp:Button ID="btnSearch" runat="server" Font-Size="16px" Text="搜索" OnClick="btnSearch_Click"
                                                                    Height="30px" Width="80px" />
                                                                <br />
                                                                <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <asp:Panel Width="100%" ID="pnlCustomerSelect" Visible="False" runat="server">
                                                        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td width="100" height="30" align="right">
                                                                    客户选择：
                                                                </td>
                                                                <td>
                                                                    <asp:RadioButtonList ID="rbtnlCustomer" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rbtnlCustomer_SelectedIndexChanged"
                                                                        RepeatLayout="Flow" RepeatDirection="Horizontal">
                                                                    </asp:RadioButtonList>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="rbtnlCustomer"
                                                                        Display="Dynamic" ErrorMessage="请先选择客户" SetFocusOnError="True" ValidationGroup="valCustomer"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </asp:Panel>
                                                    <asp:Panel Width="100%" ID="pnlCustomerInfo" Visible="False" runat="server">
                                                        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td>
                                                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td width="100" height="30" align="right">
                                                                                姓名：
                                                                            </td>
                                                                            <td>
                                                                                <asp:Label ID="lblCustomerName" runat="server"></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="100" height="30" align="right">
                                                                                电话：
                                                                            </td>
                                                                            <td>
                                                                                <asp:Label ID="lblPhone" runat="server"></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                                <td>
                                                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td width="100" height="30" align="right">
                                                                                手机：
                                                                            </td>
                                                                            <td>
                                                                                <asp:Label ID="lblCellPhone" runat="server"></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="100" height="30" align="right">
                                                                                &nbsp;
                                                                            </td>
                                                                            <td>
                                                                                &nbsp;
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2" height="30" align="center">
                                                                    <br />
                                                                    <asp:Button ID="btnConfirmCustomer" runat="server" OnClick="btnConfirmCustomer_Click"
                                                                        Text="确定" ValidationGroup="valCustomer" Font-Size="16px" Width="200px" Height="30px" />
                                                                    <br />
                                                                    <hr />
                                                                    <br />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </asp:Panel>
                            </wijmo:C1TabPage>
                            <wijmo:C1TabPage runat="server" Text="添加新客户" StaticKey="" ID="C1Tabs1_Tab2">
                               <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td>
                                                                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td width="100" height="30" align="right">
                                                                            姓名：
                                                                        </td>
                                                                        <td>
                                                                            <asp:TextBox ID="txtCustomerName" runat="server"></asp:TextBox>
                                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="txtCustomerName"
                                                                                Display="Dynamic" ErrorMessage="请输入姓名" SetFocusOnError="True" ValidationGroup="addCustomer"></asp:RequiredFieldValidator>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td width="100" height="30" align="right">
                                                                            电话：
                                                                        </td>
                                                                        <td>
                                                                            <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td>
                                                                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td width="100" height="30" align="right">
                                                                            手机：
                                                                        </td>
                                                                        <td>
                                                                            <asp:TextBox ID="txtCellPhone" runat="server"></asp:TextBox>
                                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="txtCellPhone"
                                                                                Display="Dynamic" ErrorMessage="请输入手机" SetFocusOnError="True" ValidationGroup="addCustomer"></asp:RequiredFieldValidator>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td width="100" height="30" align="right">
                                                                            &nbsp;
                                                                        </td>
                                                                        <td>
                                                                            &nbsp;
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" height="30" align="center">
                                                                <asp:Label ID="lblMsgAdd" runat="server" ForeColor="Red" Visible="False"></asp:Label>
                                                                <br />
                                                                <asp:Button ID="btnAddCustomer" runat="server" OnClick="btnAddCustomer_Click" Text="添加"
                                                                    ValidationGroup="addCustomer" Font-Size="16px" Width="200px" Height="30px" />
                                                                <br />
                                                                <hr />
                                                                <br />
                                                            </td>
                                                        </tr>
                                                    </table>
                            </wijmo:C1TabPage>
                        </Pages>
                    </wijmo:C1Tabs>
                           
                            <asp:Label ID="lblCustomerID" runat="server" Visible="False"></asp:Label>
                                        <asp:Label ID="lblCurrentUser" runat="server" Visible="False"></asp:Label>
                                        <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                            <wijmo:C1SuperPanel ID="pnlSalesOrderInfo" runat="server" KeyboardSupport="False" Height="800px" Width="100%">
                                <ResizableOptions Handles="All" Helper="ui-widget-content wijmo-wijsuperpanel-helper" />
                                <ContentTemplate>
                                    
                                            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        地址：
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtAddress" runat="server" Width="400px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="txtAddress"
                                                            Display="Dynamic" ErrorMessage="请输入地址" SetFocusOnError="True" ValidationGroup="add"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        订单日期：
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtDateOrder" runat="server"></asp:TextBox>
                                                        <wijmo:C1InputDateExtender ID="txtDateOrder_C1InputDateExtender" runat="server" Culture="zh-CN" ShowTrigger="True" TargetControlID="txtDateOrder">
                                                            <PopupPosition>
                                                                <Offset Top="4" />
                                                            </PopupPosition>
                                                        </wijmo:C1InputDateExtender>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        交货日期：</td>
                                                    <td>
                                                        <asp:TextBox ID="txtDateDelivery" runat="server"></asp:TextBox>
                                                       
                                                        <wijmo:C1InputDateExtender ID="txtDateDelivery_C1InputDateExtender" runat="server" Culture="zh-CN" ShowTrigger="True" TargetControlID="txtDateDelivery">
                                                            <PopupPosition>
                                                                <Offset Top="4" />
                                                            </PopupPosition>
                                                        </wijmo:C1InputDateExtender>
                                                       
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        验货日期： 
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtDateInspect" runat="server"></asp:TextBox>
                                                        
                                                        <wijmo:C1InputDateExtender ID="txtDateInspect_C1InputDateExtender" runat="server" Culture="zh-CN" ShowTrigger="True" TargetControlID="txtDateInspect">
                                                            <PopupPosition>
                                                                <Offset Top="4" />
                                                            </PopupPosition>
                                                        </wijmo:C1InputDateExtender>
                                                        
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        安装日期：
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtDateInstall" runat="server"></asp:TextBox>
                                                        <wijmo:C1InputDateExtender ID="txtDateInstall_C1InputDateExtender" runat="server" Culture="zh-CN" ShowTrigger="True" TargetControlID="txtDateInstall">
                                                            <PopupPosition>
                                                                <Offset Top="4" />
                                                            </PopupPosition>
                                                        </wijmo:C1InputDateExtender>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        合同号：
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtSalesOrderNumber" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" ControlToValidate="txtSalesOrderNumber"
                                                            Display="Dynamic" ErrorMessage="请输入合同号" ValidationGroup="add"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        设计师：
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="lblDesignerTrueName" runat="server"></asp:Label>
                                                        <asp:Label ID="lblDesignerUserName" runat="server" Visible="False"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        订单备注：
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtNotesOrder" runat="server" Width="400px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        制作备注：
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtNotesManufacture" runat="server" Width="400px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        安装备注：
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtNotesInstall" runat="server" Width="400px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" align="center">
                                                        <br />
                                                        <asp:Button ID="btnOK" runat="server" Font-Size="16px" Height="30px" OnClick="btnOK_Click"
                                                            Text="生成订单" ValidationGroup="add" Width="200px" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" align="center">
                                                        <br />
                                                    </td>
                                                </tr>
                                            </table>
                                       </td>
                                    <td width="8" background="../images/tab_15.gif">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                                     
                                </ContentTemplate>
                            </wijmo:C1SuperPanel>
                                  
                    
              
         </td>
            </tr>
            <tr>
                <td height="35" background="../images/tab_19.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="35">
                                <img src="../images/tab_18.gif" width="12" height="35" />
                            </td>
                            <td align="center">
                                &nbsp;
                            </td>
                            <td width="16">
                                <img src="../images/tab_20.gif" width="16" height="35" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
                
    </div>
    </form>
</body>
</html>
